Skip to main content

Attributes Overview

HTML attributes are special words used inside the opening tag to control the element's behaviour. HTML attributes are a modifier of an HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to an HTML start tag.

HTML attributes generally appear as name-value pairs, separated by =, and are written within the start tag of an element, after the element's name:

<element attribute="value">element content</element>

HTML Attributes can be divided in to the following categories

  • Core Attributes
  • Lanuage Attributes
  • Common Attributes
  • HTML5 Attributes
  • Event Attributes